int countConsistentStrings(char* allowed, char** words, int wordsSize) {
    int i = 0;
    int count = 0;
    for (i = 0; i < wordsSize; i++) {
        int j = 0;
        int flag = 1;
        while (words[i][j]) {
            if (NULL == strchr(allowed, words[i][j])) {
                flag = 0;
                break;
            }
            j++;
        }
        count += flag;
    }

    return count;
}